<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <blog v-for="item in blogArr":post="item"></blog>
        
    </div>
    
    
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        Vue.component('blog',{
            props:['post'],
            template:`
            <div >
                <h2>{{post.title}}</h2>
                <div v-html="post.content"></div>
            </div>
            `
        })
        new Vue({
            el:'#app',
            data:{
                blogArr:[
                    {id:1,title:'生活记录：2022.4.21',content:'<p><span style="color: aqua;">今天也是元气满满的一天呢！</span></p>'},
                    {id:2,title:'今日运势观察',content:'<p><span style="color: rgb(179, 190, 29);">完，水逆。</span></p>'},
                    {id:3,title:'震惊！某高校竟然发生子这种事！！',content:'<p><span style="size: 9cm; color: brown;">学长今天下雨出门了</span></p>'},
                    {id:4,title:'开摆了',content:'<p><span style="color: balck;">开摆了</span></p>'},
                    {id:5,title:'喝奶茶了',content:'<p><span style="color: black;">看番了</span></p>'}
                ]
            },

        })
        
    </script>
</body>
</html>